<div class="wrap_content bg_none">
    <div class="navigator_content">
        <div class="navigator_ads">
            <img class="ml_100" src="<?php echo BASE_URL; ?>/themes/list/images/ads_logo.gif" />
        </div>
    </div>

    <div class="wrap_content_left box_ct_list"  style="width: 74%;overflow:hidden; margin:0;">
        <div class="ct_left_list">
            <h2 class="cl_555 mb_5 size_16">Tiêu điểm</h2>
            <ul class="pd_b_10">
                <?php $count_hot = 0; ?>
                <?php foreach($hot_article as $hot_art): $count_hot++; ?>
                <li>
                    <?php if($count_hot == 1): ?>
                        <a class="cl_555" href="#" title="<?php echo $hot_art->title;?>"> <img src="<?php echo $hot_art->image;?>" alt="<?php echo $hot_art->title;?>" /></a>
                    <?php endif;?>
                    <p class="line_h_17 mb_10"><a class="cl_555" href="#" title="<?php echo $hot_art->title;?>"><?php echo $hot_art->title;?></a></p>
                </li>
                <?php endforeach; ?>
            </ul>

            <div class="scroll_box">
                <h2 class="cl_555 mb_5 size_16">Tin mới nhất</h2>
                <ul>
                    <?php $count_new = 0; ?>
                    <?php foreach($news_article as $new_art): $count_new++; ?>
                    <li>
                        <?php if($count_new == 1): ?>
                        <a class="cl_555" href="#" title="<?php echo $new_art->title;?>"> <img src="<?php echo $new_art->image;?>" alt="<?php echo $new_art->title;?>" /></a>
                        <?php endif;?>
                        <p class="line_h_17 mb_10"><a class="cl_555" href="#" title="<?php echo $new_art->title;?>"><?php echo $new_art->title;?></a></p>
                    </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        </div>

        <div class="main_content_list mt_10">
            <div class="breadcrumb tit_border_bot" style="float: left;">

                <label><?php echo $dep_detail->name;?></label>
            </div>

            <?php if(isset($list_disease) && !empty($list_disease)): ?>
                <div class="area_list">
                    <?php foreach($list_disease as $disease): ?>
                        <div class="area_content">
                            <a class="first" href="<?php echo $disease->href;?>" title="<?php echo $disease->name;?>"><img alt="<?php echo $disease->name;?>" src="<?php echo $disease->image;?>" /></a>
                            <div>
                                <a class="tit" href="<?php echo $disease->href;?>" title="<?php echo $disease->name;?>"><?php echo $disease->name;?></a>
                                <p><?php echo $disease->short_description;?></p>
                                <a class="show_more" href="<?php echo $disease->href;?>" title="<?php echo $disease->name;?>">Xem thêm &raquo;</a>
                            </div>
                        </div>
                    <?php endforeach; ?>
                </div>

                <?php if ($paginator['upper'] >= 2) :?>
                    <div class="paging_list">
                        <?php if ($current_page >= 2) :?>
                            <a href="<?php echo $link_pagging.($current_page - 1).'.html';?>">Trước</a>
                        <?php endif; ?>

                        <?php for ($index = $paginator['lower']; $index <= $paginator['upper']; $index++) :?>
                        <a <?php if ($index == $current_page) :?> class="current" <?php endif; ?> href="<?php if ($index == $current_page) :?> javascript:;void(0); <?php else: ?> <?php echo $link_pagging.$index.'.html';?> <?php endif; ?>"><?php echo $index; ?></a>
                        <?php endfor; ?>

                        <?php if ($current_page < $paginator['total']) :?>
                            <a href="<?php echo $link_pagging.($current_page + 1).'.html';?>">Sau</a>
                        <?php endif; ?>
                    </div>
                <?php endif;?>

            <?php endif;?>
        </div>

    </div>

    <div class="wrap_content_right"  style="float: left;width: 26%; margin-top: 0;">
        <div class="box_ad_right">
            <p>Advertisement</p>
        </div>

        <?php if(isset($disease_new) && !empty($disease_new)):?>
            <div class="grid_content_right">
                <h2>Bạn nên xem</h2>
                <ul>
                    <?php foreach ($disease_new as $dis_new) : ?>
                    <li class="content_right">
                        <a href="<?php echo $dis_new->href; ?>" title="<?php echo $dis_new->name; ?>"><img src="<?php echo $dis_new->image; ?>"></a>
                        <p>
                            <a href="<?php echo $dis_new->href; ?>" title="<?php echo $dis_new->name; ?>"><b><?php echo $dis_new->name; ?></b></a>
                        </p>
                    </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        <?php endif;?>

        <?php if(isset($list_group) && !empty($list_group)):?>
            <div class="grid_content_right">
                <h2>Tin liên quan</h2>
                <ul>
                    <?php foreach ($list_group as $art_group) : ?>
                    <li class="content_right">
                        <a href="#" title="<?php echo $art_group->title; ?>"><img src="<?php echo $art_group->image; ?>"></a>
                        <p>
                            <a href="#" title="<?php echo $art_group->title; ?>"><b><?php echo $art_group->title; ?></b></a>
                        </p>
                    </li>
                    <?php endforeach; ?>
                </ul>
            </div>
        <?php endif;?>

    </div>
</div>

<div class="wrap_relate_topic">
    <p class="size_12">Advertisement</p>
    <div class="box_relate">
        <span class="cl_c7">Relates Topics: </span>
        <a href="javascript:;void(0);">How To Lower Cholesterol</a>
        <a href="javascript:;void(0);">Type 2 Diabetes Diet</a>
        <a href="javascript:;void(0);">Triglyceride Diet</a>
    </div>
</div>

<script type="text/javascript">
    function sticky_relocate() {
        var window_top = jQuery(window).scrollTop();
        var scroll_top = jQuery('.ct_left_list').offset().top + jQuery(".ct_left_list").height();
        var scroll_bot = parseInt(jQuery(".wrap_relate_topic").offset().top);

        var cur_width  = jQuery(".scroll_box").width();
        var box_height = jQuery(".scroll_box").height();

        var cur_height = window_top + box_height;
        if (window_top > scroll_top) {
            jQuery(".scroll_box").addClass("box_sticky");
            jQuery(".scroll_box").css("width", cur_width);
        }
        else {
            jQuery(".scroll_box").removeClass("box_sticky");
        }

        if (cur_height >= scroll_bot) {
            $(".scroll_box").css("margin-top", "-" + (Math.abs(cur_height - scroll_bot) + 50) + "px");
        } else {
            $(".scroll_box").css("margin-top", "0px");
        }

    }
    jQuery(function() {
        jQuery(window).scroll(sticky_relocate);
        sticky_relocate();
    });


</script>


